﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>详细页面</title>
    <link rel="stylesheet" href="//cdn.bootcss.com/bootstrap/3.3.6/css/bootstrap.min.css">
    <link rel="stylesheet" href="//cdn.bootcss.com/font-awesome/4.4.0/css/font-awesome.min.css">
    <link rel="stylesheet" href="/Areas/PawRoot/assets/css/common.css" />
    <link rel="stylesheet" href="/Areas/PawRoot/open/lotUploader/lotuploader1.0.1.min.css" />
    <script src="//cdn.bootcss.com/jquery/1.10.2/jquery.min.js"></script>
    <script src="/Areas/PawRoot/assets/js/common.min.js"></script>
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    @RenderSection("HeadCss", false)
</head>
<body>
    <header class="panel panel-default">
        <div class="panel-heading">表单页面</div>
        <article class="panel-body">
            <div class="row">
                @RenderBody()
            </div>
        </article>
    </header>
    <script src="//cdn.bootcss.com/bootstrap/3.3.6/js/bootstrap.min.js"></script>
    <script src="/Areas/PawRoot/open/lotUploader/lotuploader1.0.2.min.js"></script>
    <script type="text/javascript">
        //实例化上传控件
        $.lotuploader({
            lotDocId: 'lot-uploader',
            lotUrl: '@Url.Action("Upload", "PartialView")',
            oneFile: true,
            fileSize: 1024 * 1024 * 5,
            btnStr: '点我就上传默认展图',
            lotSuccessFunc: function (data) {
                $('#displayPic').attr('src', data.msg);
            },
            lotErrorFunc: function (msg) {
                $('#lot-uploader').append('<div class="lot-temp" style="color:red">' + msg + '</div> ');
                setTimeout(function () {
                    $('.lot-temp').remove();
                }, 2000);
            }
        });

        //消息提醒（不知道为啥，去掉则添加页面和编辑页面就没有弹窗口了）
        function showMsg(obj, time) {
            if (obj) {
                if (!time) { time = 1000; }
                easyDialog.open({ container: { content: obj }, autoClose: time });
            }
        }

        //返回Index
        $('#form-gohome').click(function () {
            window.location.href = '@Url.Action("Index")';
        });
    </script>
    @RenderSection("JsScript", false)
</body>
</html>